// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.search-result {
  @top: search-result;
  .default-border-radius();
  .thicker-box-shadow();
  --search-accent: transparent;
  background-color: @osu-colour-b4;
  padding: 10px 20px;
  padding-right: 0;
  margin: 10px 0;
  position: relative;

  &::before {
    .full-size();
    content: "";
    width: 5px;
    border-top-left-radius: @border-radius-base;
    border-bottom-left-radius: @border-radius-base;
    background-color: var(--search-accent);
  }

  &--artist_track {
    --search-accent: hsl(var(--hsl-lime-1));
  }

  &--beatmapset {
    --search-accent: @pink-dark;
  }

  &--forum_post {
    --search-accent: @yellow-dark;
  }

  &--team {
    --search-accent: hsl(var(--hsl-green-1));
  }

  &--user {
    --search-accent: @blue-dark;
  }

  &--wiki_page {
    --search-accent: @purple-dark;
  }

  &__entries {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;

    .@{top}--beatmapset & {
      @media @desktop {
        grid-template-columns: 1fr 1fr;
      }
    }

    .@{top}--team & {
      @media @desktop {
        grid-template-columns: 1fr 1fr;
      }
    }

    .@{top}--user & {
      display: block;
    }
  }

  &__more-button {
    flex: none;
    .link-plain();
    color: @osu-colour-f1;
    .center-content();
    font-size: 20px; // icon size
    padding: 5px;
    width: 30px;

    &--hidden {
      opacity: 0;
      padding: 0;
      width: 20px;
      pointer-events: none;
    }
  }

  &__row {
    padding: 5px 0;

    &--entries-container {
      display: flex;
    }

    &--notice {
      font-size: @font-size--title-small;
      text-align: center;
    }

    &--more {
      .link-plain();
      color: @osu-colour-f1;
      font-size: @font-size--normal;
      display: block;
      text-align: center;
    }

    &--paginator {
      padding: 0;
    }
  }
}
